﻿<%@ Page Title="" Language="C#" MasterPageFile="MemberMaster.Master" AutoEventWireup="true"
    CodeBehind="Favorite.aspx.cs" Inherits="WinnerCMS.WebUI.Templates.WinnerCMS6.Member.Favorite" %>


<%@ Register Src="~/UserControl/UC_AjaxLoading.ascx" TagName="UC_AjaxLoading" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server">
        <ProgressTemplate>
            <uc1:UC_AjaxLoading ID="UC_AjaxLoading1" runat="server" />
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table width="100%" cellpadding="4" border="0">
                <tr>
                    <td>
                        标题：<asp:TextBox ID="txtTitle" runat="server" Width="288px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtTitle"
                            ErrorMessage="请输入" ValidationGroup="add"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td>
                        网址：<asp:TextBox ID="txtURL" runat="server" Width="350px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtURL"
                            ErrorMessage="请输入" ValidationGroup="add"></asp:RequiredFieldValidator>
                    </td>
                </tr>
            </table>
            <asp:Button ID="btnAdd" runat="server" Text="添加" CssClass="btn" OnClick="btnAdd_Click"
                ValidationGroup="add" />
                <br /><br />
            <asp:GridView ID="GV_List" runat="server" AutoGenerateColumns="False" Width="100%"
                OnRowDataBound="GV_List_RowDataBound" DataKeyNames="ID" OnRowDeleting="GV_List_RowDeleting"
                OnRowCancelingEdit="GV_List_RowCancelingEdit" OnRowEditing="GV_List_RowEditing"
                OnRowUpdating="GV_List_RowUpdating">
                <HeaderStyle BackColor="Black" ForeColor="White" />
                <Columns>
                    <asp:BoundField DataField="Title" HeaderText="标题">
                        <ItemStyle HorizontalAlign="Center" Width="150px" />
                        <HeaderStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="网址">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server" Width="98%" Text='<%# Eval("URL") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("URL") %>' Target="_blank">访问</asp:HyperLink>
                        </ItemTemplate>
                        <HeaderStyle HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:TemplateField>
                    <asp:BoundField DataField="LastVisit" HeaderText="最后访问" DataFormatString="{0:yyyy-MM-dd HH:mm:ss}"
                        HtmlEncode="False" ReadOnly="True" Visible="False">
                        <ItemStyle Width="108px" />
                        <HeaderStyle Width="108px" HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:CommandField ShowEditButton="True">
                        <HeaderStyle Width="60px" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:CommandField>
                    <asp:CommandField ShowDeleteButton="true" CausesValidation="False">
                        <HeaderStyle Width="60px" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:CommandField>
                </Columns>
                <HeaderStyle Font-Bold="True" Font-Size="12px" Height="24px" Wrap="True" />
                <RowStyle Height="24px" />
            </asp:GridView>
            <WinnerCMS:PageNavigation ID="PageNavigation1" runat="server" OnPageChanging="PageNavigation1_PageChanging"
                SubmitButtonClass="btn" PageSize="15">
            </WinnerCMS:PageNavigation>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</asp:Content>
